package com.atom.module.mvi.android.lifecycle

import androidx.lifecycle.Lifecycle
import com.atom.module.mvi.binder.Binder

fun Lifecycle.createDestroy(f: Binder.() -> Unit): Binder {
    return Binder(CreateDestroyBinderLifecycle(this)).apply(f)
}

fun Lifecycle.startStop(f: Binder.() -> Unit): Binder {
    return Binder(StartStopBinderLifecycle(this)).apply(f)
}

fun Lifecycle.resumePause(f: Binder.() -> Unit): Binder {
    return Binder(ResumePauseBinderLifecycle(this)).apply(f)
}
